import request from '@/utils/request'
import type { loginForm, loginResponseData, userResponseData,CategoryResponseData } from './type'
enum API {
  LOGIN_URL = '/user/login',
  USERINFO_URL = '/user/info'
}

//                         登录接口参数类型                      服务器返回的数据类型
export const reqLogin = (data: loginForm) => request.post<any, loginResponseData>(API.LOGIN_URL, data)
export const reqUserInfo = () => request.get<any, userResponseData>(API.USERINFO_URL)
export const reqCaInfo = () => request.get<any, CategoryResponseData>(API.USERINFO_URL)
